#include "Service.h"


Service::Service(void)
{
}


Service::~Service(void)
{
}


void Service::SetID(const string id){
	m_sID = id;
}

void Service::AddInput(const string input){
	m_vInputs.push_back(string(input));
}

void Service::AddOutput(const string output){
	m_vOutputs.push_back(string(output));
}

string& Service::GetID(){
	return m_sID;
}

vector<string>& Service::GetInputs(){
	return m_vInputs;
}

vector<string>& Service::GetOutputs(){
	return m_vOutputs;
}

string Service::toString(){
	string result;
	result+= m_sID;
	result+=":[]";

	result+="[";
	for(vector<string>::iterator it =m_vInputs.begin();it!=m_vInputs.end();it++)
		result+=*it +",";
	result+="]";

	result+="[";
	for(vector<string>::iterator it =m_vOutputs.begin();it!=m_vOutputs.end();it++)
		result+=*it +",";
	result+="]";
	return result;
}